﻿@model BlogAppExt.Models.IndexVM

<div class="jumbotron">

    <h1>Word Squeeze <i class="fa fa-book"></i></h1>
    <h3>Check out some Blogs!</h3>

</div>

<div class="container">
    @foreach (var post in Model.PostList)
    {
        <hr />
        <div class="row" onclick="location.href='/Home/PostDetail/@post.PostId'">
            <div class="col-sm-1"><img class="img-responsive img-thumbnail" src=@post.Image /></div>

            <div class="col-sm-6">
                <div class="row">
                    <h4>@post.Title&nbsp;&nbsp;&nbsp;&nbsp;<small>@post.Text</small></h4>
                </div>
                <div class="row">
                    @post.UserName
                </div>
            </div>
        </div>
    }
    <hr />
    <div class="row">
        <div class="btn-group">
            <a class="btn btn-success" href="/Home/Index/@Model.GetPrevIndex()">Previous</a>
            <a class="btn btn-success" href="/Home/Index/@Model.GetNextIndex()">Next</a>
        </div>
    </div>
</div>
